{include file="public:header" /}
<!--添加团购-->
<form id="info_form" action="{:url('addDo')}" method="post" enctype="multipart/form-data">
<div class="pad_lr_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
			<li class="current">基本信息</li>
            <li>SEO设置</li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th width="120">选择楼盘 :</th>
                        <td>
                            <span id="house_name"></span>
                            <button class="J_showdialog" data-pic="0" data-uri="{:url('House/publicSelectContent', ['menuid'=>$menuid])}" data-acttype="ajax" data-title="选择楼盘" data-id="select" data-width="670" data-height="500" data-boxtype="radio" data-boxname="aid" data-val="house_id" data-displaybox="house_name">选择楼盘</button>
                            <input type="hidden" name="house_id" id="house_id" value="">
                        </td>
                    </tr>

		            <tr>
						<th>标题 :</th>
						<td>
							<input type="text" name="title" id="J_title" class="input-text" size="40">
		                </td>
					</tr>
                    <tr>
                        <th>楼盘特色 :</th>
                        <td>
                            <textarea name="tese" id="tese" style="width:600px;height:50px;resize: none;"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <th>团购优惠 :</th>
                        <td>
                            <textarea name="youhui" id="youhui" style="width:600px;height:50px;resize: none;"></textarea>
                        </td>
                    </tr>
                    <tr>
                        <th>团购价格 :</th>
                        <td>
                            <input type="text" name="price" class="input-text" size="10">元/平米
                            <span>原价格 :</span>
                            <input type="text" name="old_price" class="input-text" size="10">元/平米
                        </td>
                    </tr>
                    <tr>
                        <th>报名人数 :</th>
                        <td>
                            <input type="text" name="buy_num" class="input-text" value="1" size="20">
                        </td>
                    </tr>
                    <tr>
                        <th>开始时间 :</th>
                        <td>
                            <input type="text" name="begin_time" id="begin_time" value="{:date('Y-m-d')}" onclick="myCalendar();" class="date" size="12" />
                            结束时间 :
                            <input type="text" name="end_time" id="J_end_time" value="" onclick="myCalendar();" class="date" size="12" />
                        </td>
                    </tr>
                    <tr>
                        <th>缩略图:</th>
                        <td><input type="file" name="img" id="img" class="input-text"  style="width:200px;" /><span> 460*280</span></td>
                    </tr>
                    <tr>
                        <th>内页切换图 :</th>
                        <td><script id="uploadpic" name="uploadpic" type="text/plain"></script>
                            <input type="button" class="btn btn_submit" style="margin:0 0 10px 10px;" onclick="upImage();" value="选择图片">
                            <div id="imageList">
                                <ul class="list clearfix"></ul>
                            </div>
                        </td>
                    </tr>
					<tr>
						<th>状态 :</th>
		 				<td>
		                	<label><input type="radio" name="status" class="radio_style" value="1" checked="checked"> 启用 </label>&nbsp;&nbsp;
							<label><input type="radio" name="status" class="radio_style" value="0" >禁用</label>
						</td>
					</tr>
                    <tr>
                        <th>详细内容 :</th>
                        <td><script id="info" name="info" type="text/plain"></script></td>
                    </tr>
				</table>
			</div>
            <div class="content_list pad_10 hidden">
                <table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th width="120">seo标题 :</th>
                        <td><input type="text" name="seo_title" id="seo_title" class="input-text" size="60"></td>
                    </tr>
                    <tr>
                        <th>seo关键词 :</th>
                        <td><input type="text" name="seo_keys" id="seo_keys" class="input-text" size="60"></td>
                    </tr>
                    <tr>
                        <th>seo描述 :</th>
                        <td><textarea name="seo_desc" id="seo_desc" cols="80" rows="8"></textarea></td>
                    </tr>
                </table>
            </div>
            </div>
		<div class="mt10"><input type="submit" value="提交" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
	</div>
</div>
</form>
{include file="public:footer" /}
<script src="__PUBLIC__/js/plugins/jquery.tools.min.js"></script>
<script src="__PUBLIC__/js/calendar/WdatePicker.js"></script>
<script type="text/javascript">
    var check_name_url = "{:url('ajaxCheckTitle')}";
    $(function(){
        $('ul.J_tabs').tabs('div.J_panes > div');
        $('.J_cate_select').cate_select({level:1});
        $.formValidator.initConfig({formid:"info_form",autotip:true});
        $("#J_title").formValidator({onshow:"请填写团购名称",onfocus:"请填写团购名称"}).inputValidator({min:1,onerror:"请填写团购名称"}).ajaxValidator({
            type : "get",
            url : check_name_url,
            datatype : "json",
            async:'false',
            success : function(result){
                if(result.status == 0){
                    return false;
                }else{
                    return true;
                }
            },
            buttons: $("#dosubmit"),
            onerror : "请填写团购名称",
            onwait : "正在验证"
        });
        $("#house_id").formValidator({onshow:"请选择楼盘",onfocus:"请选择楼盘"}).inputValidator({min:1,onerror:"请选择楼盘"});

    });
   </script>
<script src="__PUBLIC__/js/ueditor/ueditor.config.js"></script>
<script src="__PUBLIC__/js/ueditor/ueditor.all.min.js"></script>
<script src="__PUBLIC__/js/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    window.UEDITOR_HOME_URL='__PUBLIC__/js/ueditor/';
    window.onload=function(){
        window.UEDITOR_CONFIG.initialFrameWidth=880;
        window.UEDITOR_CONFIG.initialFrameHeight=500;
        UE.getEditor('info');
        upmoreimg();
    }

</script>
<script src="__PUBLIC__/js/ueditor/uploadImg.js"></script>

</body>
</html>